import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus' //element组件
import 'element-plus/dist/index.css' //element全局样式
import router from "./router/router.js"; //路由
import * as ElementPlusIconsVue from '@element-plus/icons-vue' //element icon图标
import { createPinia } from 'pinia'

const pinia = createPinia() //全局状态管理

const app = createApp(App)
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(pinia)
app.use(router)

//引入vue-echarts组件
import VueECharts from 'vue-echarts'

//将VueEcharts注册为全局组件
app.component('v-chart', VueECharts)

// 屏蔽警告信息（ts的error）  开发环境警用，生产环境启用
// app.config.warnHandler = () => null;

app.mount("#app");
